﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace my_google_doc_online
{
    public partial class PorxyForm : Form
    {
        public string host;
        public int port;

        public PorxyForm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(textBox1.Text) || string.IsNullOrEmpty(textBox2.Text))
                {
                    MessageBox.Show("请输入代理地址与端口号", "请输入", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                host = textBox1.Text;
                port = Convert.ToInt32(textBox2.Text);
                DialogResult = DialogResult.OK;
            }
            catch (Exception ex)
            {
                MessageBox.Show( ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

        }
    }
}
